package com.example.springbootecharts.service.impl;

import com.example.springbootecharts.model.Product;
import com.example.springbootecharts.reposity.ProductReposity;
import com.example.springbootecharts.service.ProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.awt.peer.ListPeer;
import java.util.List;

/**
 * @author: xulinyi
 * @create: 2019-04-01 15:32
 **/
@Service
public class ProductServiceImpl implements ProductService {
    @Resource
    private ProductReposity reposity;

    @Override
    public List<Product> findAll() {
        return reposity.findAll();
    }

    @Override
    public List<Product> adds(List<Product> list) {
       return reposity.saveAll(list);
    }
}
